import Mock from "mockjs";
import homeMock from "../api/mockServe/home";
import user from "./user";
import permission from "./mockServe/permission";
import deviceList from "./deviceList";
import pressure from "@/dashboard/pressure";
import fault from "@/dashboard/fault";
import runstate from "@/dashboard/runstate";

// 定义mock拦截
Mock.mock("/api/home/getData", homeMock);

// 用户管理:增删查改
Mock.mock(/\/api\/user\/get/, user.getUserList);
Mock.mock("/api/user/create", "post", user.createUser);
Mock.mock("/api/user/update", "post", user.updateUser);
Mock.mock("/api/user/del", "post", user.deleteUser);

// 登录权限
Mock.mock(/api\/permission\/getMenu/, "post", permission.getMenu);

// 设备管理
Mock.mock(/\/api\/device\/getDeviceList/, "get", deviceList.getDeviceList);

// 压力曲线
Mock.mock(/\/api\/device\/getPressureData/, "get", pressure.getData);

// 故障信息
Mock.mock(/\/api\/device\/getFaultData/, "get", fault.getFaultData);

// 设备运转状态
Mock.mock(/\/api\/device\/getRunStatetData/, "get", runstate.getRunStatetData);
